package com.xgkj.diyiketang.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.xgkj.diyiketang.EatShowApp;
import com.xgkj.diyiketang.util.ACache;

/**
 * Created by Administrater on 2015/12/8.
 */
public abstract class BaseFragment extends Fragment {

    protected View rootView;

//    private static ACache mACache;

    protected abstract int getContentViewId();

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        rootView = inflater.inflate(getContentViewId(), container, false);
//        ApiService.getApiService().addCompositeSub(getActivity().getTaskId());
//        mACache = ACache.get(getActivity());
//        EventBus.getDefault().register(this);
//        mUnbinder =  ButterKnife.bind(this, rootView);
        return rootView;
    }
    public EatShowApp getEatShowApp(){
        return  (EatShowApp)getActivity().getApplication();
    }
    @Override
    public void onDestroyView() {
        super.onDestroyView();
//        mUnbinder.unbind();
//        ApiService.getApiService()
//                .removeCompositeSub(getActivity().getTaskId());
//        EventBus.getDefault().unregister(this);
    }
}
